using JTZY.Model.Business;

namespace JTZY.Model.Business
{
    /// <summary>
    /// 用户表
    /// </summary>
    [SugarTable("corecmsuser")]
    public class Corecmsuser
    {

        /// <summary>
        /// 用户ID 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public long Id { get; set; }

        /// <summary>
        /// 客户名称 
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 密码 
        /// </summary>
        public string PassWord { get; set; }

        /// <summary>
        /// 联系电话 
        /// </summary>
        public string Mobile { get; set; }

        /// <summary>
        /// 性别[1男2女3未知] 
        /// </summary>
        public int? Sex { get; set; }

        /// <summary>
        /// 生日 
        /// </summary>
        public DateTime? Birthday { get; set; }

        /// <summary>
        /// 头像 
        /// </summary>
        public string AvatarImage { get; set; }

        /// <summary>
        /// 昵称 
        /// </summary>
        public string NickName { get; set; }

        /// <summary>
        /// 余额 
        /// </summary>
        public decimal Balance { get; set; }

        /// <summary>
        /// 积分 
        /// </summary>
        public int? Point { get; set; }

        /// <summary>
        /// 用户等级 
        /// </summary>
        public int? Grade { get; set; }

        /// <summary>
        /// 注册时间 
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间 
        /// </summary>
        public DateTime? UpdataTime { get; set; }

        /// <summary>
        /// 状态[1正常2停用] 
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 推荐人 
        /// </summary>
        public long? ParentId { get; set; }

        /// <summary>
        /// 关联三方账户 
        /// </summary>
        public int? UserWx { get; set; }

        /// <summary>
        /// 删除标志 有数据就是删除 
        /// </summary>
        public bool IsDelete { get; set; }

        /// <summary>
        /// 所属代理商 
        /// </summary>
        public long? AgentId { get; set; }

        /// <summary>
        /// 已认证 
        /// </summary>
        public int? IsReviewed { get; set; }

        /// <summary>
        /// 欠款 
        /// </summary>
        public decimal Debt { get; set; }

        /// <summary>
        /// 详细地址 
        /// </summary>
        public string Addr { get; set; }

        /// <summary>
        /// 所属区域 
        /// </summary>
        public string AreaIds { get; set; }

        /// <summary>
        /// 客户账号 
        /// </summary>
        public string AccountCode { get; set; }

        /// <summary>
        /// 客户类型 
        /// </summary>
        public string CustomerType { get; set; }

        /// <summary>
        /// 客户等级 
        /// </summary>
        public string Level { get; set; }

        /// <summary>
        /// 账期 
        /// </summary>
        public int? OutDay { get; set; }

        /// <summary>
        /// 信用额度 
        /// </summary>
        public decimal CreditAmt { get; set; }

        /// <summary>
        /// 商品类别 
        /// </summary>
        public string Categories { get; set; }

        /// <summary>
        /// 销售模式 
        /// </summary>
        public string OutFlag { get; set; }

        /// <summary>
        /// 推广人 
        /// </summary>
        public long? SaleManId { get; set; }

        /// <summary>
        /// 联系人 
        /// </summary>
        public string ContactPeople { get; set; }

        /// <summary>
        /// 开通后台账号 
        /// </summary>
        public bool IsOpenAdmin { get; set; }

        /// <summary>
        /// 配送方式 
        /// </summary>
        public string ShippingType { get; set; }

        /// <summary>
        /// 客户来源
        /// </summary>
        public string Source { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int? StoreId { get; set; }

        /// <summary>
        /// 区域 
        /// </summary>
        public string AreaNames { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(SaleManId))] //自定义关系映射
        public SaleMan SaleManNav { get; set; }

        [SugarColumn(IsIgnore = true)]
        public string WelcomeContent { get; set; }

        public decimal? UseAmt { get; set; }
        public string WxQrCode { get; set; }
    }

    public class WarehouseDto
    {

        /// <summary>
        /// 用户ID 
        /// </summary>
        public long cusId { get; set; }

        /// <summary>
        /// 客户名称 
        /// </summary>
        public string WarehouseName { get; set; }
    }
    }